package queens.forms;

import java.util.Iterator;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.validator.ValidatorForm;

@SuppressWarnings("serial")
public class QueensForm extends ValidatorForm {

	public String accion 	    = "";
	public String accionSistema = "";

	

	public String getAccion() {
		return accion;
	}



	public void setAccion(String accion) {
		this.accion = accion;
	}

	
	
	public String getAccionSistema() {
		return accionSistema;
	}



	public void setAccionSistema(String accionSistema) {
		this.accionSistema = accionSistema;
	}



	@SuppressWarnings("unchecked")
	protected boolean faltaCampoObligatorio(ActionErrors errors){
		Iterator it = errors.get();
		while(it.hasNext()){
			ActionError error = (ActionError)it.next();
			if(error.getKey().equals("errors.required")){
				return true;
			}
		}
		return false;
	}

}
